import { BaseModel } from '../common/base-model';
import { OpenOpsId } from '../common/id-generator';

export type Flag = {
  value: unknown;
} & BaseModel<OpenOpsId>;

export enum EnvironmentType {
  PRODUCTION = 'prod',
  DEVELOPMENT = 'dev',
  TESTING = 'test',
}

export enum OpsEdition {
  COMMUNITY = 'ce',
  ENTERPRISE = 'ee',
  CLOUD = 'cloud',
}

export type OpenOpsFlag = FlagId;

export enum FlagId {
  SHOW_POWERED_BY_IN_FORM = 'SHOW_POWERED_BY_IN_FORM',
  CLOUD_AUTH_ENABLED = 'CLOUD_AUTH_ENABLED',
  PROJECT_LIMITS_ENABLED = 'PROJECT_LIMITS_ENABLED',
  CURRENT_VERSION = 'CURRENT_VERSION',
  EDITION = 'EDITION',
  IS_CLOUD_PLATFORM = 'IS_CLOUD_PLATFORM',
  EMAIL_AUTH_ENABLED = 'EMAIL_AUTH_ENABLED',
  EXECUTION_DATA_RETENTION_DAYS = 'EXECUTION_DATA_RETENTION_DAYS',
  ENVIRONMENT = 'ENVIRONMENT',
  FRONTEND_URL = 'FRONTEND_URL',
  LATEST_VERSION = 'LATEST_VERSION',
  OWN_AUTH2_ENABLED = 'OWN_AUTH2_ENABLED',
  PRIVACY_POLICY_URL = 'PRIVACY_POLICY_URL',
  BLOCKS_SYNC_MODE = 'BLOCKS_SYNC_MODE',
  PRIVATE_BLOCKS_ENABLED = 'PRIVATE_BLOCKS_ENABLED',
  FLOW_RUN_TIME_SECONDS = 'FLOW_RUN_TIME_SECONDS',
  SHOW_BILLING = 'SHOW_BILLING',
  INSTALL_PROJECT_BLOCKS_ENABLED = 'INSTALL_PROJECT_BLOCKS_ENABLED',
  MANAGE_PROJECT_BLOCKS_ENABLED = 'MANAGE_PROJECT_BLOCKS_ENABLED',
  SHOW_COMMUNITY = 'SHOW_COMMUNITY',
  SHOW_COPILOTS = 'SHOW_COPILOTS',
  SHOW_DOCS = 'SHOW_DOCS',
  SHOW_PLATFORM_DEMO = 'SHOW_PLATFORM_DEMO',
  SHOW_SIGN_UP_LINK = 'SHOW_SIGN_UP_LINK',
  SHOW_REWARDS = 'SHOW_REWARDS',
  SUPPORTED_APP_WEBHOOKS = 'SUPPORTED_APP_WEBHOOKS',
  TEMPLATES_PROJECT_ID = 'TEMPLATES_PROJECT_ID',
  TERMS_OF_SERVICE_URL = 'TERMS_OF_SERVICE_URL',
  THEME = 'THEME',
  THIRD_PARTY_AUTH_PROVIDER_REDIRECT_URL = 'THIRD_PARTY_AUTH_PROVIDER_REDIRECT_URL',
  SAML_AUTH_ACS_URL = 'SAML_AUTH_ACS_URL',
  WEBHOOK_URL_PREFIX = 'WEBHOOK_URL_PREFIX',
  ALLOW_NPM_PACKAGES_IN_CODE_STEP = 'ALLOW_NPM_PACKAGES_IN_CODE_STEP',
  GRAFANA_URL = 'GRAFANA_URL',
  OPENOPS_TABLES_PUBLIC_URL = 'OPENOPS_TABLES_PUBLIC_URL',
  ANALYTICS_PUBLIC_URL = 'ANALYTICS_PUBLIC_URL',
  SHOW_DURATION = 'SHOW_DURATION',
  DARK_THEME_ENABLED = 'DARK_THEME_ENABLED',
  ENVIRONMENT_ID = 'ENVIRONMENT_ID',
  FRONTEGG_URL = 'FRONTEGG_URL',
  CLOUD_CONNECTION_PAGE_ENABLED = 'CLOUD_CONNECTION_PAGE_ENABLED',
  SHOW_DEMO_HOME_PAGE = 'SHOW_DEMO_HOME_PAGE',
  OAUTH_PROXY_URL = 'OAUTH_PROXY_URL',
  CANDU_CLIENT_TOKEN = 'CANDU_CLIENT_TOKEN',
  SAMPLE_DATA_SIZE_LIMIT_KB = 'SAMPLE_DATA_SIZE_LIMIT_KB',
  FEDERATED_LOGIN_ENABLED = 'FEDERATED_LOGIN_ENABLED',
}
